//
//  TF_LivingImageViewTouches.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/2/18.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

class TF_LivingImageViewTouches: UIImageView {
    ///【字段含义】图片URL
    @objc public var img = ""
   
    @objc public var didTouchedBlock: ((NSString) -> ())?
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.isUserInteractionEnabled = true
    }

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        if (self.didTouchedBlock != nil) {
            self.didTouchedBlock?(self.img as NSString)
        }
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
